package com.geguol.controller;

import com.geguol.properties.GirlProperties;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者：13687
 * 日期：2017/7/28
 * 项目：telcom
 * 描述：控制器
 */
//@ResponseBody
//@Controller
@RestController
public class HelloController {
	@Autowired
	private GirlProperties girlProperties;

	@GetMapping(value = "/hello/{id}")
	public String getProperties(@PathVariable("id") Integer id){
		return girlProperties.getCupSize()+id;
	}

	@PostMapping("/login")
	public String getList(@RequestParam("name")String name, @RequestParam("password") String password){
		return "接受的参数："+name+password;
	}

}
